<?php
require "download.php"
?>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<title>乌云文章</title>
</head>
<body>

目前仅支持 drops.wooyun.org 里的文章转换</br>
例如：http://drops.wooyun.org/tips/10450</br>
需要支持其他网站，请联系我 navisec#163.com</br>

	<form method="post" action="">
		<input type="text" name="url" />
		<input type="submit" value="提交">
	</form>

<?php 
$url = isset($_POST['url'])?$_POST['url']:'';

if(empty($url)){
	exit;
}

list($file_name,$url) = get_page($url);

if(!empty($file_name) && !empty($url)){
	echo sprintf('<a href="./storage%s">%s[markdown]</a><br />',$url,$file_name);
	//http://127.0.0.1/release/bowen2markdown//release/storage/wooyun_drops/10450/xmd
	echo sprintf('<a href="./view.php?path=.%s">%s[html]</a><br />',$url,$file_name);
}

?>
</body>
</html>